package com.ajk.server.model.request;


import org.springframework.web.multipart.MultipartFile;

import com.ajk.shop.model.Category;

public class CategoryReq extends Category{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private MultipartFile imageFile;
	public MultipartFile getImageFile() {
		return imageFile;
	}
	public void setImageFile(MultipartFile imageFile) {
		this.imageFile = imageFile;
	}

    public Category toCategory(){
		Category category = new Category();
		category.setCreateTime(this.getCreateTime());
		category.setDisplayCol(this.getDisplayCol());
		category.setId(this.getId());
		category.setImage(this.getImage());
		category.setLastModifyTime(this.getLastModifyTime());
		category.setLevel(this.getLevel());
		category.setParentId(this.getParentId());
		category.setRecommend(this.getRecommend());
		category.setSortOrder(this.getSortOrder());
		category.setDisplayCol(this.getDisplayCol());
		category.setStatus(this.getStatus());
		category.setTitle(this.getTitle());
		return category;
	}
	
}
